# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Zuf <kontakt.zuf@gmail.com>
# Contributor: Darwin Bautista <djclue917@gmail.com>
# Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>

pkgname=kdenlive
pkgver=18.08.1
pkgrel=1
pkgdesc="A non-linear video editor for Linux using the MLT video framework"
arch=(x86_64)
url="https://www.kdenlive.org/"
license=(GPL)
groups=(kde-applications kdemultimedia)
depends=(knewstuff knotifyconfig kfilemetadata purpose mlt glu qt5-quickcontrols)
makedepends=(extra-cmake-modules kdoctools v4l-utils)
optdepends=('ffmpeg: for FFmpeg plugin'
            'cdrtools: for creation of DVD ISO images'
            'dvdauthor: for creation of DVD'
            'dvgrab: for firewire capture'
            'recordmydesktop: for screen capture'
            'xine-ui: for DVD preview'
            'vlc: for DVD preview'
            'plasma-desktop: theme configuration')
source=("https://download.kde.org/stable/applications/$pkgver/src/$pkgname-$pkgver.tar.xz"{,.sig})
sha256sums=('ee521740bd3b10d966fd102116cdadbf3f383025575912eba0080fdba9dcb7aa'
            'SKIP')
validpgpkeys=(CA262C6C83DE4D2FB28A332A3A6A4DB839EAA6D7  # Albert Astals Cid <aacid@kde.org>
              F23275E4BF10AFC1DF6914A6DBD2CE893E2D1C87) # Christoph Feck <cfeck@kde.org>

prepare() {
  mkdir -p build
}

build() {
  cd build
  cmake ../$pkgname-$pkgver \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DBUILD_TESTING=OFF
  make
}

package() {
  cd build
  make DESTDIR="$pkgdir" install
}
